block: rename message to block in SignedBlock#465
Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom Mar 22, 2026
Merged
block: rename message to block in SignedBlock#465tcoratger merged 1 commit intoleanEthereum:mainfrom
message to block in SignedBlock#465tcoratger merged 1 commit intoleanEthereum:mainfrom
Conversation
anshalshukla
approved these changes
Mar 22, 2026
pablodeymo
added a commit
to lambdaclass/ethlambda
that referenced
this pull request
Mar 25, 2026
Aligns with leanEthereum/leanSpec#465 which renamed SignedBlock.message to SignedBlock.block. SSZ compatibility is unaffected since SSZ is schemaless; this is purely a naming convention change to keep all client implementations consistent with the spec.
MegaRedHand
pushed a commit
to lambdaclass/ethlambda
that referenced
this pull request
Mar 25, 2026
…#250) ## Motivation [leanSpec#465](leanEthereum/leanSpec#465) renamed the `SignedBlock` container field from `message` to `block`. As noted in that PR: > This PR changes the ssz container field name from SignedBlock.message to SignedBlock.block. It doesn't affect ssz compatibility because ssz is schemaless, but I believe we rely on the same container namings across all client impls, so it will be hard to sync specs vs impls if not renamed. This PR makes the corresponding rename in ethlambda to stay aligned with the spec and other client implementations. ## Changes Renamed `SignedBlockWithAttestation.message` → `SignedBlockWithAttestation.block` across 9 files (39 insertions, 40 deletions): ### Core type definition - **`crates/common/types/src/block.rs`**: Renamed the struct field, updated the manual `Debug` impl, `from_signed_block()`, `to_signed_block()`, and doc comments that referenced `message`. ### Blockchain crate - **`crates/blockchain/src/lib.rs`**: Updated block construction in `propose_block()`, field access in `process_or_pend_block()`, and pending block cascade in `process_pending_children()`. - **`crates/blockchain/src/store.rs`**: Updated `on_block_core()` (block extraction and cloning), `verify_signatures()` (block and proposer attestation access), and a test helper struct construction. ### Storage crate - **`crates/storage/src/store.rs`**: Updated the destructuring pattern in `write_signed_block()`. ### Networking crate - **`crates/net/p2p/src/gossipsub/handler.rs`**: Updated all 10 field accesses in `handle_gossipsub_message()` (block receive logging) and `publish_block()` (block publish logging). - **`crates/net/p2p/src/req_resp/handlers.rs`**: Updated block root computation in `handle_blocks_by_root_response()`. ### Test files - **`crates/blockchain/tests/forkchoice_spectests.rs`**: Updated `build_signed_block()` construction and slot access. - **`crates/blockchain/tests/signature_spectests.rs`**: Updated slot access for block timing. - **`crates/blockchain/tests/signature_types.rs`**: Updated local variable name and struct construction in `From<TestSignedBlockWithAttestation>` impl. ### Not changed - **`TestSignedBlockWithAttestation.message`** (in `signature_types.rs`): This test deserialization type still uses `message` to match the current YAML test fixture field names. It will need updating when `LEAN_SPEC_COMMIT_HASH` is bumped to a commit that includes leanSpec#465. ## Notes - **SSZ compatibility**: SSZ is schemaless, so this rename has zero impact on wire format or cross-client interop. - **No behavioral changes**: This is a pure rename — no logic was added, removed, or modified. - The resulting access pattern `signed_block.block.block` (outer `.block` is `BlockWithAttestation`, inner `.block` is `Block`) is slightly redundant but matches the spec structure. ## How to Test ```bash make fmt # ✅ passes make lint # ✅ passes make test # ✅ passes ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Description
I feel like this is more natural, what do you think @anshalshukla ?
🔗 Related Issues or PRs
✅ Checklist
toxchecks to avoid unnecessary CI fails:uvx tox